[server:main]
use = egg:Paste#http
port = {{ PULSAR_PORT | default(8913) }}
host = {{ PULSAR_HOSTNAME | default('pulsar') }}

[app:main]
paste.app_factory = pulsar.web.wsgi:app_factory
app_config = %(here)s/app.yml

## Configure uWSGI (if used).
[uwsgi]
master = True
paste-logger = true
http = {{ PULSAR_HOSTNAME | default('pulsar') }}:{{ PULSAR_PORT | default(8913) }}
processes = 1
enable-threads = True

[watcher:web]
cmd = chaussette --fd $(circus.sockets.web) paste:server.ini
use_sockets = True
# Pulsar must be single-process for now...
numprocesses = 1

[socket:web]
host = localhost
port = 8913

## Configure Python loggers.
[loggers]
keys = root,pulsar

[handlers]
keys = console

[formatters]
keys = generic

[logger_root]
level = {{ PULSAR_LOG_LEVEL | default('INFO') }}
handlers = console

[logger_pulsar]
level = {{ PULSAR_LOG_LEVEL | default('INFO') }}
handlers = console
qualname = pulsar
propagate = 1

[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = {{ PULSAR_LOG_LEVEL | default('INFO') }}
formatter = generic

[formatter_generic]
format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s
